import request from './request'

export const GetHomeList = ()=> request.get('/index/index')
// 历史记录和热门搜索数据的请求
export const GetPopupData = ()=> request.get('/search/index')
export const GetSearchTipsListData = (params) => request.get("/search/helper",{params});
export const GetGoodsListData = (params) => request.get("/goods/list",{params});
//清除历史记录
export const ClearHistory = () => request.post("/search/clearhistory");
//登录接口（没有账号自动注册）
export const GoLogin = (params) => request.post("/auth/loginByWeb",params);
//请求产品明细
export const GetGoodsDetail = (params) => request.get("/goods/detail",{params});
//相关产品
export const GetGoodsRelated = (params) => request.get("/goods/related",{params});
//获取购物车产品数量
export const GetCartGoodsCount = () => request.get("/cart/goodscount");
//加入购物车
export const CartAdd = (params) => request.post("/cart/add",params);
//购物车数据渲染
export const GetCartData = () => request.get("/cart/index")
//改变购物车数据
export const ChangeGoodschecked = params => request.post("/cart/checked",params)
// 步进器修改请求
export const StepNum = params => request.post("/cart/update",params)
// 删除商品
export const DelGood = params => request.post("/cart/delete",params)
//专题
export const GetTopicList = (params) => request.get("/topic/list",{params});
//分类
export const GetCatalog = () => request.get("/catalog/index")
//获取当前分类
export const GetCatalogCurrent = (params) => request.get("/catalog/current",{params})